3.48 \(\int \frac {\tan ^m(c+d x) (A+B \tan (c+d x)+C \tan ^2(c+d x))}{\sqrt {b \tan (c+d x)}} \, dx\)

Optimal. Leaf size=170 \[ \frac {2 (A-C) \tan ^{m+1}(c+d x) \, _2F_1\left (1,\frac {1}{4} (2 m+1);\frac {1}{4} (2 m+5);-\tan ^2(c+d x)\right )}{d (2 m+1) \sqrt {b \tan (c+d x)}}+\frac {2 B \tan ^{m+2}(c+d x) \, _2F_1\left (1,\frac {1}{4} (2 m+3);\frac {1}{4} (2 m+7);-\tan ^2(c+d x)\right )}{d (2 m+3) \sqrt {b \tan (c+d x)}}+\frac {2 C \tan ^{m+1}(c+d x)}{d (2 m+1) \sqrt {b \tan (c+d x)}} \]

[Out]

2*C*tan(d*x+c)^(1+m)/d/(1+2*m)/(b*tan(d*x+c))^(1/2)+2*(A-C)*hypergeom([1, 1/4+1/2*m],[5/4+1/2*m],-tan(d*x+c)^2
)*tan(d*x+c)^(1+m)/d/(1+2*m)/(b*tan(d*x+c))^(1/2)+2*B*hypergeom([1, 3/4+1/2*m],[7/4+1/2*m],-tan(d*x+c)^2)*tan(
d*x+c)^(2+m)/d/(3+2*m)/(b*tan(d*x+c))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 170, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {20, 3630, 3538, 3476, 364} \[ \frac {2 (A-C) \tan ^{m+1}(c+d x) \, _2F_1\left (1,\frac {1}{4} (2 m+1);\frac {1}{4} (2 m+5);-\tan ^2(c+d x)\right )}{d (2 m+1) \sqrt {b \tan (c+d x)}}+\frac {2 B \tan ^{m+2}(c+d x) \, _2F_1\left (1,\frac {1}{4} (2 m+3);\frac {1}{4} (2 m+7);-\tan ^2(c+d x)\right )}{d (2 m+3) \sqrt {b \tan (c+d x)}}+\frac {2 C \tan ^{m+1}(c+d x)}{d (2 m+1) \sqrt {b \tan (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Int[(Tan[c + d*x]^m*(A + B*Tan[c + d*x] + C*Tan[c + d*x]^2))/Sqrt[b*Tan[c + d*x]],x]

[Out]

(2*C*Tan[c + d*x]^(1 + m))/(d*(1 + 2*m)*Sqrt[b*Tan[c + d*x]]) + (2*(A - C)*Hypergeometric2F1[1, (1 + 2*m)/4, (
5 + 2*m)/4, -Tan[c + d*x]^2]*Tan[c + d*x]^(1 + m))/(d*(1 + 2*m)*Sqrt[b*Tan[c + d*x]]) + (2*B*Hypergeometric2F1
[1, (3 + 2*m)/4, (7 + 2*m)/4, -Tan[c + d*x]^2]*Tan[c + d*x]^(2 + m))/(d*(3 + 2*m)*Sqrt[b*Tan[c + d*x]])

Rule 20

Int[(u_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Dist[(b^IntPart[n]*(b*v)^FracPart[n])/(a^IntPart[n
]*(a*v)^FracPart[n]), Int[u*(a*v)^(m + n), x], x] /; FreeQ[{a, b, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n]
&&  !IntegerQ[m + n]

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 3476

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[x^n/(b^2 + x^2), x], x, b*Tan[c + d
*x]], x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rule 3538

Int[((b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*T
an[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Tan[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x] && NeQ
[c^2 + d^2, 0] &&  !IntegerQ[2*m]

Rule 3630

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> Simp[(C*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])
^m*Simp[A - C + B*Tan[e + f*x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0]
&&  !LeQ[m, -1]

Rubi steps

\begin {align*} \int \frac {\tan ^m(c+d x) \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right )}{\sqrt {b \tan (c+d x)}} \, dx &=\frac {\sqrt {\tan (c+d x)} \int \tan ^{-\frac {1}{2}+m}(c+d x) \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx}{\sqrt {b \tan (c+d x)}}\\ &=\frac {2 C \tan ^{1+m}(c+d x)}{d (1+2 m) \sqrt {b \tan (c+d x)}}+\frac {\sqrt {\tan (c+d x)} \int \tan ^{-\frac {1}{2}+m}(c+d x) (A-C+B \tan (c+d x)) \, dx}{\sqrt {b \tan (c+d x)}}\\ &=\frac {2 C \tan ^{1+m}(c+d x)}{d (1+2 m) \sqrt {b \tan (c+d x)}}+\frac {\left (B \sqrt {\tan (c+d x)}\right ) \int \tan ^{\frac {1}{2}+m}(c+d x) \, dx}{\sqrt {b \tan (c+d x)}}+\frac {\left ((A-C) \sqrt {\tan (c+d x)}\right ) \int \tan ^{-\frac {1}{2}+m}(c+d x) \, dx}{\sqrt {b \tan (c+d x)}}\\ &=\frac {2 C \tan ^{1+m}(c+d x)}{d (1+2 m) \sqrt {b \tan (c+d x)}}+\frac {\left (B \sqrt {\tan (c+d x)}\right ) \operatorname {Subst}\left (\int \frac {x^{\frac {1}{2}+m}}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d \sqrt {b \tan (c+d x)}}+\frac {\left ((A-C) \sqrt {\tan (c+d x)}\right ) \operatorname {Subst}\left (\int \frac {x^{-\frac {1}{2}+m}}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d \sqrt {b \tan (c+d x)}}\\ &=\frac {2 C \tan ^{1+m}(c+d x)}{d (1+2 m) \sqrt {b \tan (c+d x)}}+\frac {2 (A-C) \, _2F_1\left (1,\frac {1}{4} (1+2 m);\frac {1}{4} (5+2 m);-\tan ^2(c+d x)\right ) \tan ^{1+m}(c+d x)}{d (1+2 m) \sqrt {b \tan (c+d x)}}+\frac {2 B \, _2F_1\left (1,\frac {1}{4} (3+2 m);\frac {1}{4} (7+2 m);-\tan ^2(c+d x)\right ) \tan ^{2+m}(c+d x)}{d (3+2 m) \sqrt {b \tan (c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.54, size = 133, normalized size = 0.78 \[ \frac {2 \tan ^{m+1}(c+d x) \left ((2 m+3) (A-C) \, _2F_1\left (1,\frac {1}{4} (2 m+1);\frac {1}{4} (2 m+5);-\tan ^2(c+d x)\right )+B (2 m+1) \tan (c+d x) \, _2F_1\left (1,\frac {1}{4} (2 m+3);\frac {1}{4} (2 m+7);-\tan ^2(c+d x)\right )+C (2 m+3)\right )}{d (2 m+1) (2 m+3) \sqrt {b \tan (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(Tan[c + d*x]^m*(A + B*Tan[c + d*x] + C*Tan[c + d*x]^2))/Sqrt[b*Tan[c + d*x]],x]

[Out]

(2*Tan[c + d*x]^(1 + m)*(C*(3 + 2*m) + (A - C)*(3 + 2*m)*Hypergeometric2F1[1, (1 + 2*m)/4, (5 + 2*m)/4, -Tan[c
 + d*x]^2] + B*(1 + 2*m)*Hypergeometric2F1[1, (3 + 2*m)/4, (7 + 2*m)/4, -Tan[c + d*x]^2]*Tan[c + d*x]))/(d*(1
+ 2*m)*(3 + 2*m)*Sqrt[b*Tan[c + d*x]])

________________________________________________________________________________________

fricas [F]  time = 0.66, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (C \tan \left (d x + c\right )^{2} + B \tan \left (d x + c\right ) + A\right )} \sqrt {b \tan \left (d x + c\right )} \tan \left (d x + c\right )^{m}}{b \tan \left (d x + c\right )}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^m*(A+B*tan(d*x+c)+C*tan(d*x+c)^2)/(b*tan(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

integral((C*tan(d*x + c)^2 + B*tan(d*x + c) + A)*sqrt(b*tan(d*x + c))*tan(d*x + c)^m/(b*tan(d*x + c)), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \tan \left (d x + c\right )^{2} + B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{\sqrt {b \tan \left (d x + c\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^m*(A+B*tan(d*x+c)+C*tan(d*x+c)^2)/(b*tan(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((C*tan(d*x + c)^2 + B*tan(d*x + c) + A)*tan(d*x + c)^m/sqrt(b*tan(d*x + c)), x)

________________________________________________________________________________________

maple [F]  time = 1.76, size = 0, normalized size = 0.00 \[ \int \frac {\left (\tan ^{m}\left (d x +c \right )\right ) \left (A +B \tan \left (d x +c \right )+C \left (\tan ^{2}\left (d x +c \right )\right )\right )}{\sqrt {b \tan \left (d x +c \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^m*(A+B*tan(d*x+c)+C*tan(d*x+c)^2)/(b*tan(d*x+c))^(1/2),x)

[Out]

int(tan(d*x+c)^m*(A+B*tan(d*x+c)+C*tan(d*x+c)^2)/(b*tan(d*x+c))^(1/2),x)

________________________________________________________________________________________

maxima [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^m*(A+B*tan(d*x+c)+C*tan(d*x+c)^2)/(b*tan(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\mathrm {tan}\left (c+d\,x\right )}^m\,\left (C\,{\mathrm {tan}\left (c+d\,x\right )}^2+B\,\mathrm {tan}\left (c+d\,x\right )+A\right )}{\sqrt {b\,\mathrm {tan}\left (c+d\,x\right )}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((tan(c + d*x)^m*(A + B*tan(c + d*x) + C*tan(c + d*x)^2))/(b*tan(c + d*x))^(1/2),x)

[Out]

int((tan(c + d*x)^m*(A + B*tan(c + d*x) + C*tan(c + d*x)^2))/(b*tan(c + d*x))^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \tan {\left (c + d x \right )} + C \tan ^{2}{\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}}{\sqrt {b \tan {\left (c + d x \right )}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**m*(A+B*tan(d*x+c)+C*tan(d*x+c)**2)/(b*tan(d*x+c))**(1/2),x)

[Out]

Integral((A + B*tan(c + d*x) + C*tan(c + d*x)**2)*tan(c + d*x)**m/sqrt(b*tan(c + d*x)), x)

________________________________________________________________________________________